
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>重置登录密码</title>
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
		<script type="text/javascript" src="__PUBLIC__/static/js/jquery.min.js"></script>
		<link rel="stylesheet" href="__PUBLIC__/static/layui/css/layui.css">
		<script src="__PUBLIC__/static/layui/layui.all.js"></script>
	</head>

	<body>
		<form class="layui-form update_form" action="">
			<div class="layui-form-item">
				<label class="layui-form-label">原密码</label>
				<div class="layui-input-block update_shurk">
					<input type="text" name="jiupwd" id="jiupwd" required lay-verify="required" placeholder="原登录密码" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">新密码</label>
				<div class="layui-input-block update_shurk">
					<input type="text" name="xinpwd" id="xinpwd" required lay-verify="required" placeholder="新登录密码" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item update_btnbox">
				<div class="layui-input-block">
					<button class="layui-btn" type="button" onclick="tj()">提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
		
	</body>

</html>
<script>
	function tj(){
		var xinpwd=$('#xinpwd').val();
		var jiupwd=$('#jiupwd').val();
		if(xinpwd==''||jiupwd==''){
			layer.msg("请输入密码");
			return;
		}
		$.ajax({
			type: 'post',
			data: {
				xinpwd: xinpwd,
				jiupwd: jiupwd
			},
			url: "return_password",
			success: function(data) {
					layer.msg(data.msg,{
					  icon: 1,
					  time: 1000 //2秒关闭（如果不配置，默认是3秒）
					},function() {
						var index = parent.layer.getFrameIndex(window.name); //获取窗口索引  
       					parent.layer.close(index);
					});
			}
		});
		
	}
</script>
